<template>
  <el-form label-position="top" class="p-10">
    <el-form-item label="链接名称">
          <el-input v-model="activeData.extConfig.linkStr"></el-input>
        </el-form-item>
        <el-form-item label="链接地址">
          <el-input v-model="activeData.extConfig.linkHref"></el-input>
        </el-form-item>
        <el-form-item label="链接状态">
          <el-select
            v-model="activeData.extConfig.linkStatus"
            placeholder="请选择"
          >
            <el-option
              v-for="item in linkStatusOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="链接打开方式">
          <el-select
            v-model="activeData.extConfig.linkTarget"
            placeholder="请选择"
          >
            <el-option
              v-for="item in linkTargetOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="对齐方式">
          <el-select
            v-model="activeData.extConfig.linkAlign"
            placeholder="请选择"
          >
            <el-option
              v-for="item in strAlignOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="链接是否禁用">
          <el-switch v-model="activeData.extConfig.linkRead" />
        </el-form-item>
  </el-form>
</template>
<script>
export default {
  name: "link-config",
  props: ["activeData"],
  data() {
    return {
      linkTargetOptions: [
        {
          value: "_blank",
          label: "新窗口打开",
        },
        {
          value: "_parent",
          label: "父窗口打开",
        },
        {
          value: "_self",
          label: "相同窗口打开",
        },
        {
          value: "_top",
          label: "整页窗口打开",
        },
      ],
      linkStatusOptions: [
        {
          value: "primary",
          label: "主要链接",
        },
        {
          value: "success",
          label: "成功链接",
        },
        {
          value: "warning",
          label: "警告链接",
        },
        {
          value: "danger",
          label: "危险链接",
        },
        {
          value: "info",
          label: "信息链接",
        },
      ],
      strAlignOptions: [
        {
          value: "center",
          label: "居中",
        },
        {
          value: "left",
          label: "居左",
        },
        {
          value: "right",
          label: "居右",
        },
      ],
    };
  },
  computed: {},
  watch: {},
  methods: {},
};
</script>
